package com.example.core.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
public class BaseVo<T> implements Serializable {

    private Map<String, String> map = new HashMap<>();

    private String id;

    private String name;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private int pageIndex = 1;

    private int pageSize = 10;

    public Map<String, String> getMap() {
        return map;
    }

    public void recalculateFields() {

    }
}
